import 'package:tender_flutter/page/person/model/tixian_history_entity.dart';

tixianHistoryEntityFromJson(TixianHistoryEntity data, Map<String, dynamic> json) {
	if (json['pageNum'] != null) {
		data.pageNum = json['pageNum'].toString();
	}
	if (json['pageSize'] != null) {
		data.pageSize = json['pageSize'].toString();
	}
	if (json['total'] != null) {
		data.total = json['total'].toString();
	}
	if (json['pages'] != null) {
		data.pages = json['pages'].toString();
	}
	if (json['list'] != null) {
		data.xList = new List<TixianHistoryDataList>();
		(json['list'] as List).forEach((v) {
			data.xList.add(new TixianHistoryDataList().fromJson(v));
		});
	}
	if (json['isFirstPage'] != null) {
		data.isFirstPage = json['isFirstPage'].toString();
	}
	if (json['isLastPage'] != null) {
		data.isLastPage = json['isLastPage'].toString();
	}
	return data;
}

Map<String, dynamic> tixianHistoryEntityToJson(TixianHistoryEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['pageNum'] = entity.pageNum;
	data['pageSize'] = entity.pageSize;
	data['total'] = entity.total;
	data['pages'] = entity.pages;
	if (entity.xList != null) {
		data['list'] =  entity.xList.map((v) => v.toJson()).toList();
	}
	data['isFirstPage'] = entity.isFirstPage;
	data['isLastPage'] = entity.isLastPage;
	return data;
}

tixianHistoryDataListFromJson(TixianHistoryDataList data, Map<String, dynamic> json) {
	if (json['txStatus'] != null) {
		data.txStatus = json['txStatus'].toString();
	}
	if (json['money'] != null) {
		data.money = json['money'].toString();
	}
	if (json['txStatusCode'] != null) {
		data.txStatusCode = json['txStatusCode'].toString();
	}
	if (json['id'] != null) {
		data.id = json['id'].toString();
	}
	if (json['account'] != null) {
		data.account = json['account'].toString();
	}
	if (json['outordercode'] != null) {
		data.outordercode = json['outordercode'].toString();
	}
	if (json['createDate'] != null) {
		data.createDate = json['createDate'].toString();
	}
	return data;
}

Map<String, dynamic> tixianHistoryDataListToJson(TixianHistoryDataList entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['txStatus'] = entity.txStatus;
	data['money'] = entity.money;
	data['txStatusCode'] = entity.txStatusCode;
	data['id'] = entity.id;
	data['account'] = entity.account;
	data['outordercode'] = entity.outordercode;
	data['createDate'] = entity.createDate;
	return data;
}